Current Location: Home> Function Categories> pi

pi

Get the pi value
Name:pi
Category:math
Programming Language:php
One-line Description:Returns the value of Pi.

Definition and usage

The pi() function returns the value of pi.

Example

 <?php
echo pi ( ) ;
?>

Try it yourself

grammar

 pi ( )

illustrate

Returns an approximation of pi. The float accuracy of the return value is determined by the precision directive in php.ini. The default value is 14. You can also use the M_PI constant that produces the exact same result as pi() .

Similar Functions
Popular Articles